﻿<UserControl x:Class="VmroleAuthor.Views.ResExtDeploymentMultiLineStringParameterView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" 
             d:DesignWidth="600">
    <UserControl.Resources>

    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="24" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="10"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column ="0" Text="{Binding Name}" FontWeight="Bold" VerticalAlignment="Center"/>
            <Button Grid.Column="2" x:Name="DescriptionButton" HorizontalAlignment="Left" Background="Transparent" BorderBrush="Transparent">
                <Button.ToolTip>
                    <TextBlock Text="{Binding Description}"/>
                </Button.ToolTip>
                <StackPanel Orientation = "Horizontal">
                    <Image  Source="..\Img\Help.ico" Width="20" Height="20"></Image>
                </StackPanel>
            </Button>

        </Grid>

        <TextBox x:Name="SettingValueName" Grid.Row="3" Grid.Column="1" MinHeight="72" VerticalContentAlignment="Top" ToolTip="{Binding ToolTipString}"
                 Text="{Binding SettingValue, Mode=TwoWay, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" FontSize="12" VerticalAlignment="Center"
                 AcceptsReturn="True" Validation.ErrorTemplate="{x:Null}" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible"/>

        <ContentPresenter Grid.Row="4" Grid.Column="1" Content="{Binding ElementName=SettingValueName, Path=(Validation.Errors).CurrentItem}" />
    </Grid>
</UserControl>
